/**
 * 文件名称：SpecificationsDaoImpl.java
 * 文件版权：ChinaParasol Technologies Co., Ltd. Copyright 2000-2020,  All rights reserved
 * 文件描述：<描述>
 * 创建作者：Administrator
 * 创建时间：Jan 6, 2013
 * 修改内容：<修改内容>
 */
package com.parasol.hcerp.service.specifications.dao;

import java.util.List;

import com.parasol.hcerp.common.jdbc.ParasolSQLSuport;
import com.parasol.hcerp.service.specifications.domain.SpecificationsBean;

/**
 * 
 * @author  Administrator
 * @version V1.0, Jan 6, 2013
 */
public class SpecificationsDaoImpl implements SpecificationsDao
{
    
    private ParasolSQLSuport parasolSQLSuport = null;
    
    public void deleteForSpecifications(String specificationsid)
    {
        parasolSQLSuport.delete("specifications.deleteForSpecifications", specificationsid);
    }
    
    public int queryForExist(SpecificationsBean specificationsBean)
    {
        String result = String.valueOf(parasolSQLSuport.queryForObject("specifications.queryForExist", specificationsBean));
        return Integer.parseInt(result);
    }
    
    @SuppressWarnings("unchecked")
    public List<SpecificationsBean> queryForList()
    {
        return (List<SpecificationsBean>)parasolSQLSuport.queryForList("specifications.queryForList");
    }
    
    public ParasolSQLSuport getParasolSQLSuport()
    {
        return parasolSQLSuport;
    }

    public void setParasolSQLSuport(ParasolSQLSuport parasolSQLSuport)
    {
        this.parasolSQLSuport = parasolSQLSuport;
    }

    public SpecificationsBean queryForSpecifications(String specificationsid)
    {
        return (SpecificationsBean)parasolSQLSuport.queryForObject("specifications.queryForSpecifications", specificationsid);
    }
    
    public void saveForSpecifications(SpecificationsBean specificationsBean)
    {
        parasolSQLSuport.insert("specifications.saveForSpecifications", specificationsBean);
    }
    
    public void updateForSpecifications(SpecificationsBean specificationsBean)
    {
        parasolSQLSuport.update("specifications.updateForSpecifications", specificationsBean);
    }
    
}
